check why logfiles sometimes not get cleaned properly #229

Closed
opened 2016-06-15 06:26:55 +00:00 by philm · 19 comments
philm commented 2016-06-15 06:26:55 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

In some occasions the logfiles won't get cleaned properly:

==> Leaving fakeroot environment.
==> Finished making: snapd 2.0.8.1-1 (Wed Jun 15 06:20:41 UTC 2016)
  -> Moving [snapd-2.0.8.1-1-x86_64.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/x86_64]
  -> Archiving log files [snapd-2.0.8.1-1-x86_64.log.tar.xz] ...
  -> Cleaning log files ...
chown: cannot access 'snapd-2.0.8.1-1-x86_64.log.tar.xz': No such file or directory
==> Finished building [snapd]
*Created by: philmmanjaro* In some occasions the logfiles won't get cleaned properly: ``` ==> Leaving fakeroot environment. ==> Finished making: snapd 2.0.8.1-1 (Wed Jun 15 06:20:41 UTC 2016) -> Moving [snapd-2.0.8.1-1-x86_64.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/x86_64] -> Archiving log files [snapd-2.0.8.1-1-x86_64.log.tar.xz] ... -> Cleaning log files ... chown: cannot access 'snapd-2.0.8.1-1-x86_64.log.tar.xz': No such file or directory ==> Finished building [snapd] ```
oberon commented 2016-06-15 10:16:43 +00:00 (Migrated from gitlab2.manjaro.org)

Seems like the tools are looking for the log in the wrong place. They are not found while they are infact present in $log_dir

Seems like the tools are looking for the log in the wrong place. They are not found while they are infact present in `$log_dir`
oberon commented 2016-06-15 10:24:11 +00:00 (Migrated from gitlab2.manjaro.org)

If I'm not mistaken the logs used to reside in $startdir/$pkgname while now they are placed in $log_dir ?

If I'm not mistaken the logs used to reside in `$startdir/$pkgname` while now they are placed in `$log_dir` ?
philm commented 2016-06-15 10:27:01 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

logs are stored depending if $LOGDEST is set in makepkg.conf.
If unset, log files stay in the dir of the PKGBUILD, if set, logs go to $LOGDEST.
Archiving log files will create the archive in /var/log/manjaro-tools by default, but log files are only chowned, if $LOGDET is not set.

*Created by: udeved* logs are stored depending if $LOGDEST is set in makepkg.conf. If unset, log files stay in the dir of the PKGBUILD, if set, logs go to $LOGDEST. Archiving log files will create the archive in /var/log/manjaro-tools by default, but log files are only chowned, if $LOGDET is not set.
oberon commented 2016-06-15 10:30:57 +00:00 (Migrated from gitlab2.manjaro.org)

So I think in the case @philmmanjaro describes, I think the log files in the PKGBUILD dir are deleted and afterwards we still try to chown it 😉

So I think in the case @philmmanjaro describes, I think the log files in the PKGBUILD dir are deleted and afterwards we still try to chown it :wink:
philm commented 2016-06-15 10:32:57 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Wrong, chown will be executed on the created archive only.

*Created by: udeved* Wrong, chown will be executed on the created archive only.
oberon commented 2016-06-15 10:43:34 +00:00 (Migrated from gitlab2.manjaro.org)

In that case it's looking in the wrong place:

chown: cannot access 'manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz': No such file or directory

while

ls /var/log/manjaro-tools/
manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz
In that case it's looking in the wrong place: ``` chown: cannot access 'manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz': No such file or directory ``` while ``` ls /var/log/manjaro-tools/ manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz ```
oberon commented 2016-06-15 10:51:02 +00:00 (Migrated from gitlab2.manjaro.org)

Or if I understand correctly when you say

If unset, log files stay in the dir of the PKGBUILD, if set, logs go to $LOGDEST.

there is something not right on that end. Because when I leave log_dir at the default, right now logs are in fact removed in the PKGBUILD dir and written to log_dir

Or if I understand correctly when you say > If unset, log files stay in the dir of the PKGBUILD, if set, logs go to $LOGDEST. there is something not right on that end. Because when I leave log_dir at the default, right now logs are in fact removed in the PKGBUILD dir and written to log_dir
philm commented 2016-06-15 10:59:06 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

github seems to autoclose.

*Created by: udeved* github seems to autoclose.
oberon commented 2016-06-15 12:13:47 +00:00 (Migrated from gitlab2.manjaro.org)

yes, when you use "fix" or "close" in the commit message 😉

yes, when you use "fix" or "close" in the commit message :wink:
oberon commented 2016-06-15 12:22:12 +00:00 (Migrated from gitlab2.manjaro.org)

It's working for me in any case. So I think it can be closed. Thanks! :)

It's working for me in any case. So I think it can be closed. Thanks! :)
oberon commented 2016-06-15 12:27:48 +00:00 (Migrated from gitlab2.manjaro.org)

Oh well maybe not.
When I set log_dir to a custom destination now, I get

  -> Archiving log files [manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz] ...
tar: Removing leading `/' from member names
tar (child): /home/bernhard/manjaro/logs/manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: /home/bernhard/manjaro/logs/manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz: Cannot write: Broken pipe
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Oh well maybe not. When I set log_dir to a custom destination now, I get ``` -> Archiving log files [manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz] ... tar: Removing leading `/' from member names tar (child): /home/bernhard/manjaro/logs/manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: /home/bernhard/manjaro/logs/manjaro-i3-solarized-settings-20160614-1-x86_64.log.tar.xz: Cannot write: Broken pipe tar: Child returned status 2 tar: Error is not recoverable: exiting now ```
oberon commented 2016-06-15 12:31:44 +00:00 (Migrated from gitlab2.manjaro.org)

I see. It's just that $log_dir does not get created and needs to exist. Maybe that's intentional.

I see. It's just that **$log_dir** does not get created and needs to exist. Maybe that's intentional.
philm commented 2016-06-15 12:39:17 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Just let me fix it later, I know the problem.

*Created by: udeved* Just let me fix it later, I know the problem.
oberon commented 2016-06-15 12:39:38 +00:00 (Migrated from gitlab2.manjaro.org)

👍

:+1:
philm commented 2016-06-17 21:04:40 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

The problem is still there ...

==> Finished making: linux316 3.16.36-1 (Fri Jun 17 21:01:57 UTC 2016)
  -> Moving [linux316-3.16.36-1-i686.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/i686]
  -> Moving [linux316-headers-3.16.36-1-i686.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/i686]
  -> Archiving log files [linux316-3.16.36-1-i686.log.tar.xz] ...
tar (child): /var/log/manjaro-tools/linux316-3.16.36-1-i686.log.tar.xz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: /var/log/manjaro-tools/linux316-3.16.36-1-i686.log.tar.xz: Wrote only 4096 of 10240 bytes
tar: Child returned status 2
tar: Error is not recoverable: exiting now
  -> Cleaning log files ...
*Created by: philmmanjaro* The problem is still there ... ``` ==> Finished making: linux316 3.16.36-1 (Fri Jun 17 21:01:57 UTC 2016) -> Moving [linux316-3.16.36-1-i686.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/i686] -> Moving [linux316-headers-3.16.36-1-i686.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/i686] -> Archiving log files [linux316-3.16.36-1-i686.log.tar.xz] ... tar (child): /var/log/manjaro-tools/linux316-3.16.36-1-i686.log.tar.xz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: /var/log/manjaro-tools/linux316-3.16.36-1-i686.log.tar.xz: Wrote only 4096 of 10240 bytes tar: Child returned status 2 tar: Error is not recoverable: exiting now -> Cleaning log files ... ```
philm commented 2016-06-17 21:22:12 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

I am really tempted to remove this archiving, which is kind if useless if you ask me.
We got to cover two cases, with and without makepkg vars, and we don't have a central location where PKGBUILDs are stored, so to implement something similar to how we handle iso profiles.

*Created by: udeved* I am really tempted to remove this archiving, which is kind if useless if you ask me. We got to cover two cases, with and without makepkg vars, and we don't have a central location where PKGBUILDs are stored, so to implement something similar to how we handle iso profiles.
philm commented 2016-06-17 21:24:22 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

I would also like to ask to please not publish a new release unless a bug is 100% fixed.+
We are in no rush.

*Created by: udeved* I would also like to ask to please not publish a new release unless a bug is 100% fixed.+ We are in no rush.
philm commented 2016-06-17 21:44:52 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Please provide more detail @philmmanjaro

For example if you set any makepkg.conf vars, and the /tmp/manjaro-tools/archives.list would also be nice.

*Created by: udeved* Please provide more detail @philmmanjaro For example if you set any makepkg.conf vars, and the /tmp/manjaro-tools/archives.list would also be nice.
philm commented 2016-06-17 21:56:02 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

Well, do we create the folder /var/log/manjaro-tools/. Currently it doesn't exist, so that is why it creates an error. Also I'm always use the default settings.

*Created by: philmmanjaro* Well, do we create the folder `/var/log/manjaro-tools/`. Currently it doesn't exist, so that is why it creates an error. Also I'm always use the default settings.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#229
No description provided.