Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   IgnorePkg, Holdpkg in libalpm/remove.c (http://www.linux-archive.org/archlinux-pacman-development/5240-ignorepkg-holdpkg-libalpm-remove-c.html)

Nagy Gabor 11-26-2007 10:00 AM

IgnorePkg, Holdpkg in libalpm/remove.c
 
Hi!

Here is a pactest file derived from remove042.py [not to commit]:
---remove049.py---
self.description = "Cascade remove a package required by a HoldPkg package"

lp1 = pmpkg("pkg1")
lp1.depends = ["imaginary"]
self.addpkg2db("local", lp1)

lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"]
self.addpkg2db("local", lp2)

self.option["holdpkg"] = ["pkg1"]

self.args = "-Rc %s" % lp2.name

self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
-------------------
[Note: lp2.requiredby is not needed now.]

As you see, -Rc simply elects a holdpkg for removal without any warning [but at
least it prints a package summary before commit].
The same for -Rs <- this is "harder" to fix [elegantly], because
alpm_recursedeps is a general-purpose deps.c function.

You probably noticed IgnorePkg in the subject: -Rs and -Rc show, that this can
be useful with -R too [we may differentiate between RemoveIgnorePkg,
UpgradeIgnorePkg, and (transaction) IgnorePkg].

Bye


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Xavier 11-26-2007 11:31 AM

IgnorePkg, Holdpkg in libalpm/remove.c
 
On Mon, Nov 26, 2007 at 12:00:54PM +0100, Nagy Gabor wrote:
> Hi!
>
> Here is a pactest file derived from remove042.py [not to commit]:
> ---remove049.py---
> self.description = "Cascade remove a package required by a HoldPkg package"
>
> lp1 = pmpkg("pkg1")
> lp1.depends = ["imaginary"]
> self.addpkg2db("local", lp1)
>
> lp2 = pmpkg("pkg2")
> lp2.provides = ["imaginary"]
> self.addpkg2db("local", lp2)
>
> self.option["holdpkg"] = ["pkg1"]
>
> self.args = "-Rc %s" % lp2.name
>
> self.addrule("PACMAN_RETCODE=0")
> self.addrule("!PKG_EXIST=pkg1")
> self.addrule("!PKG_EXIST=pkg2")
> -------------------
> [Note: lp2.requiredby is not needed now.]
>
> As you see, -Rc simply elects a holdpkg for removal without any warning [but at
> least it prints a package summary before commit].
> The same for -Rs <- this is "harder" to fix [elegantly], because
> alpm_recursedeps is a general-purpose deps.c function.
>
> You probably noticed IgnorePkg in the subject: -Rs and -Rc show, that this can
> be useful with -R too [we may differentiate between RemoveIgnorePkg,
> UpgradeIgnorePkg, and (transaction) IgnorePkg].
>

Why? Isn't HoldPkg already equivalent to RemoveIgnorePkg? This sounds like
unnecessary complication to me.
However, the scope of HoldPkg might be extended for covering Rc and Rs too,
as you suggested.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Nagy Gabor 11-26-2007 11:49 AM

IgnorePkg, Holdpkg in libalpm/remove.c
 
> Why? Isn't HoldPkg already equivalent to RemoveIgnorePkg? This sounds like
> unnecessary complication to me.
> However, the scope of HoldPkg might be extended for covering Rc and Rs too,
> as you suggested.
>

Ehh, indeed;-) I totally misinterpreted HoldPkg, but now I've read our manual;-)
If HoldPkg == RemoveIgnorePkg, then why we need user confirmation for removing
them if he listed the package in the "command line" (package was added by
remove_addtarget)? This is not done with IgnorePkg neither. So they are not
"symmetric" in this way.
RemoveIgnorePkg (and so Holdpkg) has real meaning in case of -Rc and -Rs only
(imho), when pacman does some auto-magic stuffs; not when I do pacman -R
holdpkg, because then I really want to remove holdpkg.

Bye


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Xavier 11-26-2007 12:15 PM

IgnorePkg, Holdpkg in libalpm/remove.c
 
On Mon, Nov 26, 2007 at 01:49:13PM +0100, Nagy Gabor wrote:
>
> > Why? Isn't HoldPkg already equivalent to RemoveIgnorePkg? This sounds like
> > unnecessary complication to me.
> > However, the scope of HoldPkg might be extended for covering Rc and Rs too,
> > as you suggested.
> >
>
> Ehh, indeed;-) I totally misinterpreted HoldPkg, but now I've read our manual;-)
> If HoldPkg == RemoveIgnorePkg, then why we need user confirmation for removing
> them if he listed the package in the "command line" (package was added by
> remove_addtarget)? This is not done with IgnorePkg neither. So they are not
> "symmetric" in this way.
> RemoveIgnorePkg (and so Holdpkg) has real meaning in case of -Rc and -Rs only
> (imho), when pacman does some auto-magic stuffs; not when I do pacman -R
> holdpkg, because then I really want to remove holdpkg.
>

Indeed, that was my opinion for ignorepkg, and by symmetry, for holdpkg :)
With the difference than removing is more dangerous :P And that IgnorePkg is
usually set by the user, while HoldPkg is set by default to pacman and glibc.
So I don't know..

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Nagy Gabor 11-26-2007 12:48 PM

IgnorePkg, Holdpkg in libalpm/remove.c
 
Idézés Xavier <shiningxc@gmail.com>:

> On Mon, Nov 26, 2007 at 01:49:13PM +0100, Nagy Gabor wrote:
> >
> > > Why? Isn't HoldPkg already equivalent to RemoveIgnorePkg? This sounds
> like
> > > unnecessary complication to me.
> > > However, the scope of HoldPkg might be extended for covering Rc and Rs
> too,
> > > as you suggested.
> > >
> >
> > Ehh, indeed;-) I totally misinterpreted HoldPkg, but now I've read our
> manual;-)
> > If HoldPkg == RemoveIgnorePkg, then why we need user confirmation for
> removing
> > them if he listed the package in the "command line" (package was added by
> > remove_addtarget)? This is not done with IgnorePkg neither. So they are
> not
> > "symmetric" in this way.
> > RemoveIgnorePkg (and so Holdpkg) has real meaning in case of -Rc and -Rs
> only
> > (imho), when pacman does some auto-magic stuffs; not when I do pacman -R
> > holdpkg, because then I really want to remove holdpkg.
> >
>
> Indeed, that was my opinion for ignorepkg, and by symmetry, for holdpkg :)
> With the difference than removing is more dangerous :P And that IgnorePkg is
> usually set by the user, while HoldPkg is set by default to pacman and
> glibc.
> So I don't know..

Exactly. Thus holdpkg cannot be set from command-line neither. So apart from the
auto-generated holdpkgs for "dangerous" removals [but come on, who wants to
remove glibc or pacman with -R ?!] the current HoldPkg is pointless imho.

Bye


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


All times are GMT. The time now is 07:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.