You are not logged in.

#1 2008-10-07 07:11:41

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Some practical ideas for pacman (wow, practical ideas from me :o)

I realized something recently. Some people (myself excluded) don't have a particular repo enabled - testing/unstable, I'm looking at you - yet might want to install something that might be in that repo, for example testing. So, right now, they'd have to enable the whole of testing, do a sync installing 34793875234 packages that they didn't want anyway, and then FINALLY they can install their package.

Or, they can use this idea instead. Let me give you an idea of what a run through my method would be like, then I'll explain the finer details of it. I also pack in a bunch of other things I want pacman to have while I'm at it tongue

$ cat /etc/pacman.conf | grep testing -A 2
[testing]
Include = /etc/pacman.d/mirrorlist
Disabled = 1

$ pacman -Ss xorg-server
testing/xorg-server 1.5.1-1 (xorg) (disabled)
    X.Org X servers
extra/xorg-server 1.4.2-2 (xorg)
    X.Org X servers
extra/xorg-server-utils 7.3-1
    X.Org utilities required by xorg-server

$ pacman -S testing/xorg
xorg package not found, searching for group...
:: group testing/xorg (including ignored packages):
    testing/xf86-video-vesa  testing/xorg-server  
:: Install whole content? [Y/n] 
:: group testing/xorg (including ignored packages):
    xf86-input-keyboard  xf86-input-mouse testing/xf86-video-vesa
    xorg-fonts-100dpi xorg-fonts-75dpi xorg-res-utils
   testing/xorg-server  xorg-twm  xorg-xinit  xterm
:: Install whole content? [Y/n] 
warning: testing/xf86-video-vesa-2.0.0-2 is in disabled testing repo -- overriding
warning: testing/xf86-xorg-server-1.5.1-1 is in disabled testing repo -- overriding
resolving dependencies ....... (0) done.
looking for inter-conflicts [100%] done.

Targets (10): testing/xf86-video-vesa-2.0.0-2  testing/xorg-server-1.5.1-1
              xf86-input-keyboard-1.3.1-1  xf86-input-mouse-1.3.0-1
              xorg-fonts-100dpi-1.0.1-1  xorg-fonts-75dpi-1.0.1-2
              xorg-res-utils-1.0.3-2  xorg-twm-1.0.4-1  xorg-xinit-1.1.0-1
              xterm-235-2  

Total Download Size:    28.78 MB
Total Installed Size:   36.70 MB

Proceed with installation? [Y/n]
:: Retrieving packages from testing...
(1/10) xorg-server-1.5.1-1....    4.8M  467.0K/s 00:00:10 [#######################] 100%
[...]
(1/10) checking for file conflicts                        [#######################] 100%
(1/10) upgrading xorg-server                              [###############        ]  67%
[...]
$

So, what happens first is that you see that I have the theoretical option "Disabled" in the settings for the testing repo.

Second, you can see that I can qualify the repo/group name, something you can't do right now but I can see a point for having.

Next, the xorg-server in testing is listed as "(disabled)", meaning that pacman won't consider that package an option in a multi-repo choice unless you explicitly specify it.

Next we see that we once again qualify a reponame/groupname combination, and this specification follows throughout the listing. I didn't think the first line looked good with the repo name prefixed to the group name so dropped it, but at every other occurance it's included.

We now come to the warning line, where pacman alerts us that we've explicitly specified that we want to use the testing repo. This is what we want in this theoretical demo, so it's all cool.

The next two lines demonstrate a feature I've wanted for a while. I've tried to keep the status display sane: the first line shows a dot for each required dependancy found and lists the dependancies needing to be installed when it's done searching, while the next line, something I'm assuming is a known value (?) can allow us to
use a %-style indicator.

Now for the target display, which shows the repo before the package name if it's disabled, such as with xorg-server or xf86-video-vesa.

I guessed the download size tongue

Now for a feature I've wanted for a while, especially with long package install sessions: package status display. You'll notice there's a (1/10) next to both the package download line and the install line. Yes, the download status line is provided by wget, so this'll definitely be a challenge to implement, but it's a nice idea anyway big_smile

Everything else you see is pretty much normal.

-dav7

Last edited by dav7 (2008-10-07 07:15:35)


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#2 2008-10-07 09:23:41

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Some practical ideas for pacman (wow, practical ideas from me :o)

pacman -S reponame/pkgname is already implemented, and documented in the man page. Your "disabled" idea can be achieved by enabling testing at the end of the repo list in pacman.conf. Please note, however, that imstalling individual packages from testing is not recommended and may break your system.

More generally, feature requests should be submitted to either the bugtracker or the pacman-dev mailing list - if you can provide relevant patches, that would be even better.

Offline

#3 2008-10-07 11:12:01

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: Some practical ideas for pacman (wow, practical ideas from me :o)

Oh. Okay.

-dav7


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

Board footer

Powered by FluxBB