Nikos Skalkotos
2014-Nov-17 13:01 UTC
Re: [Libguestfs] [PATCH] list-applications: Add support for pacman
OK, I'll try to fix the epoch thing for all three. Nikos On 17 November 2014 13:49, Richard W.M. Jones <rjones@redhat.com> wrote:> On Mon, Nov 17, 2014 at 01:41:28PM +0200, Nikos Skalkotos wrote: >> OK, I'll make the suggested changes and I'll try to come up with a new >> patch by tomorrow or the day after tomorrow. I just noticed that a >> space is missing between STREQ and ( in the key assignment code which >> violates the project's coding style. I'll fix that too. >> >> For a test-case, I can write a make-archlinux-img.sh script and send >> it in another patch. It's not big deal. >> >> Another thing, I left out of the patch the epoch translation. Pacman's >> version formats looks like this: epoch:version-rel. You have the epoch >> hard-coded to 0 in list_applications_deb() and >> list_applications_rpm(), > > Hmm, this is a bug ... > >> so I did the same but I can implement it for >> the sake of completeness. Should I be using the >> guestfs___parse_unsigned_int() function for the string to int >> conversion? > > Yes, or sscanf. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-top is 'top' for virtual machines. Tiny program with many > powerful monitoring features, net stats, disk stats, logging, etc. > http://people.redhat.com/~rjones/virt-top
Richard W.M. Jones
2014-Nov-17 13:12 UTC
Re: [Libguestfs] [PATCH] list-applications: Add support for pacman
On Mon, Nov 17, 2014 at 03:01:57PM +0200, Nikos Skalkotos wrote:> OK, I'll try to fix the epoch thing for all three.Actually I've just fixed it (for RPM -- I don't think Debian has a problem). If Arch has an Epoch-like field, then it'd be good to fix that. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Richard W.M. Jones
2014-Nov-17 13:22 UTC
Re: [Libguestfs] [PATCH] list-applications: Add support for pacman
On Mon, Nov 17, 2014 at 01:12:56PM +0000, Richard W.M. Jones wrote:> + case 'i': > + return safe_memdup (g, (void *) (store + offset), > + max_len > 4 ? 4 : max_len);I pushed this patch, minus the obvious exploit above ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Nikos Skalkotos
2014-Nov-17 13:57 UTC
Re: [Libguestfs] [PATCH] list-applications: Add support for pacman
It's not exactly a problem but Debian supports an epoch. The format is like this: [epoch:]upstream_version[-debian_revision] https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version Right now if a package has a version like this: 1:1.2.3-1, libguestfs will translate it as: epoch=0 version = 1:1.2.3 release=1 The same thing does my patch for pacman. If we are to leave it like this, then it makes more sense to do the same for pacman, otherwise in both cases the version field should be translated to: epoch=1 version = 1.2.3 release=1 Nikos On 17 November 2014 15:12, Richard W.M. Jones <rjones@redhat.com> wrote:> On Mon, Nov 17, 2014 at 03:01:57PM +0200, Nikos Skalkotos wrote: >> OK, I'll try to fix the epoch thing for all three. > > Actually I've just fixed it (for RPM -- I don't think Debian > has a problem). > > If Arch has an Epoch-like field, then it'd be good to fix that. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-df lists disk usage of guests without needing to install any > software inside the virtual machine. Supports Linux and Windows. > http://people.redhat.com/~rjones/virt-df/
Apparently Analagous Threads
- Re: [PATCH] list-applications: Add support for pacman
- Re: [PATCH] list-applications: Add support for pacman
- [PATCH] list-applications: Add support for pacman
- [PATCH] list-applications: Add support for pacman
- Re: [PATCH] list-applications: Add support for pacman