You are not logged in.

#1 2010-12-01 21:34:30

yvonney
Member
Registered: 2008-06-11
Posts: 671

offline install: '-syuu' doesn't update-yet pkgs copied to right spot

ISSUE: copied packages not being found by pacman though they're in right spot.


Hi, installed (via latest archboot) and got a working bootable USB stick with 'base' on it.
So, then I copied ALL packages from my old system over to the USB stick's /var/cache/pacman/pkg

I expected to be able to be offline and simply go:

pacman -Syu  or -syuu and have pacman update all the newly copied in packages,
Then be able to install whatever I wished without having to use pacman -U which is totally impractical.

Must have missed something obvious like perhaps needing to edit the pacman.conf?

I don't recall every having to do this in the past. pacman would find whatever was in the /pkg's folder locally.

So, easy one so sorry to ask. Just needing/hoping to save time on this one.

Thanks!

Offline

#2 2010-12-01 21:56:18

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

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

It would help if you described what actually happened, not what you expected would happen.

Offline

#3 2010-12-01 22:01:53

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

The -y tells Pacman to sync, how do you actually expect it to sync to a remote server while you are offline?

# pacman -Su

does the trick just fine - after a successful database update, that is; if you don't update your database, obviously pacman's records won't match with the packages its cache directory.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2010-12-01 22:05:25

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

kind, thanks.
I would like pacman to find packages locally. On my fresh USB stick which when I log in and run pacman -Syuu it does not see the entire collection of all packages that I've copied to /var/cache/pacman/pkg on this fresh usb stick.

I just took a look at pacman.conf. I don't want to do repo-add etc. I simply want pacman to find locally all the packages.
I almost certain that this has always worked in the past.

I create a base working install, copy all my packages from old install over to /var/cache/pacman/pkg and then upon doing any attempt to install anything pacman would use the locally available packages.

Barring that I'm going to need to figure out how archboot can get my intel wireless card running without online access.

thank you again!

funny how I forget what I once knew better over and over. :-)

Last edited by yvonney (2010-12-01 23:59:54)

Offline

#5 2010-12-01 22:09:04

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

I was sure I tried pacman -Su though should reboot and try again. Not sure I understand the 'successful database update'.
The pacman -Su does not do a database update? PRetty sure that didn't work for me though will reboot and try shortly.

Offline

#6 2010-12-01 22:12:24

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

from the wiki:
Try running pacman -Syy to force a refresh of all package lists.

I will try this and apologies if I've been slack for not checking wiki before posting.
I seem to recall it just worked during previous installs.

Offline

#7 2010-12-01 22:34:34

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

Sorry for the series of posts. I have read many threads, Tried various things.

-- almost certain copying all packages to /var/cache/pacman/pkg worked in the past.
-- do not want to do repo-add as I've not had to with recent installs.
-- i simply did a base install, copied a mass of packages from old install over to new usb stick's /var/cache/pacman/pkg and whatever i tried to install was found locally.

Would like to know if possible what have I missed or other.

Last edited by yvonney (2010-12-01 22:42:50)

Offline

#8 2010-12-02 03:09:28

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

Like B already said you need to be connected to sync the database with -y. pacman doesn't magically know what packages are available, it needs to download the package list. Once that happens you can use -Su to upgrade, though if any packages have changed between copying and syncing it won't be able to find the correct version.

Are you sure you never synced the systems you say you did this before with? I was pretty sure the pacman database doesn't even get created until the first time you do a -Sy

Offline

#9 2010-12-02 04:03:29

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

that must be the magic tip. the packages list! I'd guess that as I always did a base install from the net-install image that the packages list got created!

guess i can find the one from my running install that I copied the packages from then to my new install.

I like the various way such as repo add, and adding a local server to pacman.conf. In this case I am going for fast and totally offline with existing packages.

So.... off I go for a hunt for the packages list file(s) ...of course, time-saving comments/tips welcomed! :-)

Last edited by yvonney (2010-12-02 04:03:46)

Offline

#10 2010-12-02 05:50:59

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

Where is the package list please, in my current install?

no luck -- lots of searching and one attempt:

I should be able to sync If I can copy the needed package lists and any other relevant files.
I cannot get online with this install which is good for motivation needing an answer anyways.

I have copyied all pacman databases from running installation to new offline installation folder.

I think they are at: /var/lib/pacman  [i did not copy the local and sync folders just the loose db files]


-- copied all the 20 or so loose '*.db.tar.gz' files in /var/lib/pacman with the exception of the already existing core and extra databases.
NOTE: maybe I should have copied over the core and extra databases as well? probably I now think.

-- I left the 2 folders 'local' and 'sync' entirely alone

-- i then ran a bunch of pacman -Su type commands.

no go, won't update or install anything.

help anyone?

need to be able to have pacman become database aware and as I have the exact same packages in the new pacman cache folder as are in my old 'currently using' install should be ok, right?

I have done this install with archboot 10.2010 and have not done anything online so I think i will need to learn the way to have pacman happy with a totally offline start/install.

no luck yet.

NOTE: i would guess my attempt this way a bad idea except that I am going stright from the same packages in my tunning/old install right over to my fresh archboot CD install. So, the core and extra databases in the new install I think are not right either.

repo-add I have used before and also a pacman.conf server point.

So, if I copy over ALL the database files in /var/lib/pacman (including the core.db.tar.gz and extra.db.tar.gz) that should work? though doesn't.

Last edited by yvonney (2010-12-02 06:55:48)

Offline

#11 2010-12-02 06:55:27

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

yvonney wrote:

I simply want pacman to find locally all the packages. I almost certain that this has always worked in the past.

No, it didn't. Not unless you explicitly tell pacman to install a package using the -U option and providing the path to the package.

As for doing an offline update without having access to the internet: you need to untar the database tarballs into /var/lib/pacman/sync. Only then you can update the system.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#12 2010-12-02 06:57:34

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

Thank you. feeling a bit silly with the length of all this.
I just addded the following to the top of my last post. it may help me to get an answer.

Where is the package list please, in my current install?

also, it worked in the past due to doing a net install I'm guessing.
this time i must copy the package lists (db files?) manually to try that.
totally offline start to finish or full installs. need to find/confirm packge list file location/interaction/usage.
or maybe that's only part of what's needed. or bad idea.

Last edited by yvonney (2010-12-02 07:38:27)

Offline

#13 2010-12-03 04:02:21

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

I seem to be .:B:. echo on this thread. This is your answer:

As for doing an offline update without having access to the internet: you need to untar the database tarballs into /var/lib/pacman/sync. Only then you can update the system.

If you don't understand that it would be better to say so, rather than opening another thread where somebody else told you the same thing.

Offline

#14 2010-12-03 06:06:13

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

yeah, I obviously did a good think before starting a new thread.
I've had a few threads I started go cold.

Short, respectful, IMO, and I was clearer in the new one, after consideration.
you are rightest of course, sincerely: thank you.

I've been generally patient with myself though unlucky on all this.
I think I missed the basic AND the finer point above or I may have been
able to write on the failure to get what I moved from /var/lib/pacman to work.

sorry. 
And oh yes I've done at least a few hours of tries and also forum searches.
unlucky on this one and unskilled on this one as well.

Now let's see what happens here.

I need to know the finer points as detailed/asked HERE:
https://bbs.archlinux.org/viewtopic.php … 12#p861212

Last edited by yvonney (2010-12-03 06:22:44)

Offline

#15 2010-12-03 06:27:34

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

As for doing an offline update without having access to the internet: you need to untar the database tarballs into /var/lib/pacman/sync. Only then you can update the system.


SO what about simply copying all from the sync folder.? /var/lib/pacman/sync
Or the entire /var/lib/pacman across?
How to avoid messing up the local folder?
Does it even matter as everything is all about syncing only?
Is the sync folder only for packages that are available in the cache? I guess?

IF I am putting all packages from running system into new pacman cache
And then I am copying all files from /var/lib/pacman, wouldn't that work without untaring database tarballs?

Offline

#16 2010-12-03 07:01:17

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

For your follow up questions it may help to understand what pacman is actually doing.

  /var/lib/pacman contains all the files for the pacman database.  I might have been a bit misleading when I referred to it as a package list before, since it's really a set of directories. local contains information about the packages that have been installed (and you shouldn't mess with that). sync contains the information about what's in the different repositories. The *tar.gz files you copied were just compressed versions of the corresponding directory in sync. When you run pacman -Sy it looks up repositories as defined in pacman.conf, downloads the tarballs and extracts them into sync. pacman -Su would compare your local and sync databases and upgrade anything from the repositories that's newer than what's on your system already. pacman will download packages into /var/cache/pacman/pkg and looks there first to see if a package has already been download.

You've never explained why you're so against repo-add. I don't use it for anything, but my impression is it's more what you want if you expect to try syncing things up somewhat regularly. That would allow you to treat a folder on your system just like the online repositories, and you can generate a database of available packages from whatever is in that directory. Instead right now you're copying folders over to trick pacman into thinking it's been synced and downloaded the packages already.  The main disadvantage of having a local repository is you may end up having two copies of every package depending on how you set things up. You might be able to get around this if you set the same location for the repository and the cache, but I'm not sure about the details of what all ends up getting created by repo-add

Offline

#17 2010-12-03 07:20:58

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

yvonney wrote:

Is the sync folder only for packages that are available in the cache? I guess?

Of course not - no offense, but if you would have checked, you would have known.

IF I am putting all packages from running system into new pacman cache
And then I am copying all files from /var/lib/pacman, wouldn't that work without untaring database tarballs?

You'll find out faster by testing yourself than by waiting here for an answer... We don't do hand-holding here.

Edit: opening a second topic for something that's essentially identical to what we're debating here is disrespectful to people that invested their time in your questions in this thread already.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#18 2010-12-03 07:24:45

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

great! thank you genuinely.
emails and typing can be way less effective than talking i find.
happy this is done. surprised my attempts were so poor.
agreed that more test woulda been better all-round.

oh, haven't done much if any messing up over the seasons cross-posting
as I and most everyone else knows that it 'can' seem disrespectful.
I tried to be logical as I wasn't clear initially, nor knowledgable
about 'package lists'.   wiki and searches undertaken.   sincere best wishes and all.

-- repo-add's fine as with the rest of the techniques.
this was a guerrilla attempt.
And, the overall benefit so far is that I Now know that my net installs
added pacman related files that I can't easily add with a totally offline install.

cool!
and another arcane post of mine goes to gold!

Last edited by yvonney (2010-12-03 08:24:05)

Offline

#19 2010-12-03 20:27:30

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

Here's my attempt at a script to do this automatically

#!/bin/bash

. /etc/makepkg.conf
repo=(core extra community)

rm -rf /var/lib/pacman/sync/* && cd /tmp
for i in ${repo[@]}; do
 mkdir /var/lib/pacman/sync/$i
 wget ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/$i/os/$CARCH/$i.db.tar.gz
 tar zxf $i.db.tar.gz -C /var/lib/pacman/sync/$i
done

What would be cool:

1) Figure out which Arch to use without sourcing /etc/makepkg.conf
2) Deal with the any arch
3) How does pacman know which repos from which to pull?  Incorporate this into the script so it can source /etc/pacman.conf and figure out which ones to use.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#20 2010-12-04 07:51:34

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: offline install: '-syuu' doesn't update-yet pkgs copied to right spot

@graysky

more great stuff!
nice -- terrific thoughts/quests -- thank you.

Last edited by yvonney (2010-12-04 07:52:46)

Offline

Board footer

Powered by FluxBB