ushis / local-repo

A local repository manager for Arch Linux with AUR support
http://ushi.wurstcase.net/local-repo/
18 stars 5 forks source link

Logging! #41

Closed ushis closed 12 years ago

ushis commented 12 years ago

What about logging? It should be optional. The log file should be specified in the config - if not, no logging...

feuri commented 12 years ago

What about something like this?

$logdir # the path where the logs are stored
├── buildlog # logs for building packages ('makepkg -L', needs 'tee')
│   ├── pkg1 # logs for pkg1
│   │   └── pkg1-3.2-1-x86_64.log # logfile for pkg1
│   ├── pkg2 # logs for pkg2
│   │   ├── pkg2-1.3-1-x86_64.log # logfile for pkg2
│   │   └── pkg2-1.4-1-x86_64.log # logfile for pkg2
│   ├── pkg3 # logs for pkgN
│   │   └── pkg3-1.0-1-x86_64.log # logfile for pkg3
│   └── pkgN # logs for pkgN
└── local-repo.log # logfile for local-repo itself
ushis commented 12 years ago

@feuri looks good to me. 'tee' is in 'coreutils' so this should be no problem.

Some suggestions:

feuri commented 12 years ago

Sounds great!

ushis commented 12 years ago

local-repo log goes to /path/to/repo/.log (like .cache) by default, but can be overwritten in the config

Finished this - its in the 'devel' branch

ushis commented 12 years ago

Ok its done. @feuri Can you test it please? Its in the buildlog branch. Dont forget to specify the buildlog path in your config.

ushis commented 12 years ago

what about storing the latest PKGBUILD in buildlog/pkgname/ too?

feuri commented 12 years ago
[2012-03-22 19:47] Forging a new package: https://aur.archlinux.org/packages/py/python3-stagger-svn/python3-stagger-svn.tar.gz
[2012-03-22 19:48] [Error] An error occurred while running: /usr/bin/makepkg -d -L # -> buildlog completely missing
[2012-03-22 19:51] Starting an AUR upgrade
[2012-03-22 19:52] Removed packages: wow-2-themes, wow-themes
[2012-03-22 19:52] Forging a new package: https://aur.archlinux.org/packages/wo/wow-themes/wow-themes.tar.gz
[2012-03-22 19:53] Added Package: wow-themes latest-1 # buildlog stored, but only 1kb
[2012-03-22 19:53] Forging a new package: https://aur.archlinux.org/packages/wo/wow-2-themes/wow-2-themes.tar.gz
[2012-03-22 19:53] Added Package: wow-2-themes latest-1 # buildlog stored, but only 1kb

Strange...

Storing the last 'PKGBUILD' too is a great idea.

feuri commented 12 years ago

The almost empty buildlogs seem to be tee's fault.

ushis commented 12 years ago

@feuri empty logs are tees fault thats right. missing logs are my fault...

ushis commented 12 years ago

ok - fixed missing logs - @feuri can you test it please

feuri commented 12 years ago

Works now. Every buidlog is stored and complete.

ushis commented 12 years ago

@feuri Thanks for testing. Is it enough to store the PKGBUILD file or should we store every file we find in the tarball (e.g. *.install, other source files)?

feuri commented 12 years ago

The PKGBUILD itself is useless without the other files found in the tarball, so we should store everything. (Or we let the user decide, what he wants to be stored)

ushis commented 12 years ago

hmm, so we need one more dir: buildlog/pkgname/pkgbuild/. hahaha - the buildlog dir will become a huge scrapyard. will think about that

feuri commented 12 years ago

Move the PKGBUILDs to 'pkgbuild/pkgname' or use 'pkname/buildlog' and 'pkgname/pkgbuild'.

ushis commented 12 years ago

BAAAM. What about this:

  1. People can specify a pkgbuild path in the config
  2. We add the --rebuild pkgname pkgname switch
  3. If pkgbuild is specified in the config people can rebuild their packages
feuri commented 12 years ago

Nothing to complain

ushis commented 12 years ago

@feuri Lets test --rebuild pkgname, which is just a shortcut for -fa /path/to/my/pkgbuilds/pkgname

feuri commented 12 years ago

Just getting ''Could not load PKGBUILD into workspace: ' :S

ushis commented 12 years ago

@feuri can you please pull and try it again and post the ouput? Aaaa, dont need this anymore - im stupid!

feuri commented 12 years ago

'Could not load PKGBUILD into workspace: /home/jonas/code/python/local-repo/testrepo/pkgbuild/archey -> /tmp/local-repo-nna0j1/tmpsg400a' The first dir is correct.

ushis commented 12 years ago

@feuri think i did it

feuri commented 12 years ago

Yep, works now.

ushis commented 12 years ago

Great - will close this issue. Lets run some tests and send 1.6 into the wild!