# Synth v1.00 has been released



## marino (Feb 16, 2016)

I'm pleased to finally issue the first release of Synth.  There were some
significant changes since the last release candidate:

```
* Rework piped command handling to fix command parsing
  Synth was using ada-util to execute external commands and receive the
  output.  Unfortunately, this implementation currently can not handle
  either extra whitespace nor can it support quoted values.  The author
  is going to fix this soon using popen and pclose for Unix, but I just
  implemented the functionality by binding to those functions myself.
* This was the only use of ada-util (I originally expected to use more
  of this library's functionality) so it's been dropped as a dependency.
  This reduces the stripped executable size by about 30%.
* The environment was prepopulated with UNAME_[x] variables.  This is
  required for Synth to support building packages for different releases
  or even architectures (e.g. building 10.2 packages on 11.0-CURRENT).
* Define OSREL in the builder's /etc/make.conf.  This seemed to be
  required for emulators/virtio-kmod which uses <pre> although it's not
  clear defining OSREL is necessary.
* Fix graceful shutdown handling in text mode.
  When the graceful shutdown key was changed from Escape to Control-Q, it
  stopped working in text mode (i.e. when it wasn't in curses).  I believe
  that's because the curses display uses the "raw" tty mode and lets all
  control characters through.  In text mode, Control-Q has a flow control
  functionality.  I wrote a routine to disable that flow control and give
  Synth access to control-Q keypress in all cases.
* The same routine disables TTY echoes when they are unwanted
* Fix "status-everything" dry-run issue where a graceful shutdown resulted
  in an unwanted "sorry" message.
* In test mode file system violation check, mark changes to /var/run
  during building to be excluded from checks.
* Add a guard that checks if Synth is launched when the current directory
  is <sysroot>/usr/local (or a subdirectory of it).  Synth will fail
  to mount everything in this case, so now it stops and tells the user
  to change directories and try again.
```

For background, see the original Thread 54690


----------



## johnblue (Feb 17, 2016)

I have had more systems in production shredded by portmaster than I can count since portmanager was killed off that I just stopped trying to use a package management system.

Thank you for creating Synth, it is a game changer!






Websters says it is "Standby".



I like how it provides direction on what to fix:


> A preliminary scan has revealed the cached options of 2 ports are
> obsolete.  Please update or remove the saved options and try again.
> e.g. make -C /usr/ports/devel/gettext-tools config
> e.g. make -C /usr/ports/devel/gettext-tools rmconfig



nice.


----------



## marino (Feb 17, 2016)

johnblue said:


> Websters says it is "Standby".


As a noun or an adjective, sure.  This is an imperative. 

The Free Diction has an entry on "stand by" phrase: http://www.thefreedictionary.com/stand


----------



## johnblue (Feb 17, 2016)

marino@ said:


> The Free Diction has an entry on "stand by" phrase: http://www.thefreedictionary.com/stand


Even better: (thanks Obama)

http://grammarist.com/usage/standby-stand-by/


----------



## xtaz (Feb 17, 2016)

This new version has now broken terminal output whenever synth exits. Anything I type in the terminal isn't echoed back to me until I type reset to reset the terminal. This was not an issue in 0.99. My $TERM is screen-256color running in tmux and PuTTY in windows. I see you have altered terminal echos in the release notes above.


----------



## marino (Feb 17, 2016)

xtaz is it fixed if you add

```
Unix.cone_of_silence (deploy => False);
```
after

```
PIL.destroy_pidfile;
```
(line 341 of [wrkdir]/synth.adb) ?

So you'd `make deinstall ; make clean ; make patch ; edit that file; make install` to check

edit: you'd still see it if you use control-c though.
I don't see this effect though. (I would have noticed right?)


----------



## xtaz (Feb 17, 2016)

If you press control-c then you can always expect some weirdness! Adding that line of code hasn't changed the behavior I'm afraid. I still lose terminal echo after running something like synth status. Also, tell you what, now I have gcc6-aux in my synth repo it makes recompiling synth for tests like this *so* much easier!


----------



## marino (Feb 17, 2016)

bummer.  you're going to have to help me here then.  I'm not seeing it in syscons or my vtty.

Deploying the cone of silence  does two things: It masks the echo bit and it masks the flow control bit (so that control-Q/S pass).
Removing it does the opposite: sets the echo bit and control flag.

It should have worked.  What command did you test it on?  Maybe that command didn't get to the pid removal line.


----------



## xtaz (Feb 17, 2016)

Tried it on status and rebuild-repository. Does it on both. Don't know. All I can say is it worked fine on 0.99 and now it doesn't on 1.0


----------



## marino (Feb 17, 2016)

okay, I think I need more data (more people to see this problem).
In the mean time, you can modify file src/unix_core.c and comment out the lines with ECHO in them. (2, one per function)


----------



## marino (Feb 17, 2016)

i think I might see the bug, it's in the __chatty_control function


----------



## marino (Feb 17, 2016)

xtaz try changing

```
tp.c_lflag &= ECHO;
```
to

```
tp.c_lflag |= ECHO;
```

try with and without the other line you already added.


----------



## xtaz (Feb 17, 2016)

FYI, this is not a tmux problem. I've just tried it with a brand new shell outside of tmux set to $TERM=xterm-256color and that also breaks local echo. Maybe it's a PuTTY thing?

Removing the cone of silence line completely and changing & to | in the two ECHO lines makes local echo work normally, *but* it shows a warning:


```
The complete build list can also be found at:
/tmp/synth_status_results.txt
readline: warning: turning off output flushing
```

With both the cone of silence line and the ECHO set to | exactly the same, local echo is working normally, but the warning still shows up.


----------



## marino (Feb 17, 2016)

not 2 lines, 1 line.  There's only one &= + ECHO.  The other is "~ECHO".  That line is okay.


----------



## xtaz (Feb 17, 2016)

Oops! OK, the 2nd echo in the file, the &= one. If I only change that one to | then there is no warning now, but local echo is broken again. If I add the cone of silence then local echo works. So it looks like it needs both.


----------



## marino (Feb 17, 2016)

needed both is what I expected.
This is the patch I propose.  Do you concur?
https://www.dragonflybsd.org/~marino/xtax-echo.patch

Do you want to try it one last time to ensure it's the correct fix?


----------



## xtaz (Feb 17, 2016)

That works fine. I just patched the source using your exact patch and everything is working as expected.


----------



## marino (Feb 17, 2016)

thanks xtaz!

```
ports-mgmt/synth: Upgrade version 1.00 => 1.01 (echo fixed)

The echo and control-flow flags weren't being restored correctly in
general, and they weren't being restored at program exit.  The result
on PuTTY was that nothing would echo to the terminal after Synth
exited, but the new version fixes it.
```


----------



## marino (Feb 17, 2016)

```
ports-mgmt/synth: Upgrade version 1.01 => 1.02 (tty checked)

Any attempt to alter echo and control flags when the standard input
stream is not connected to a tty will fail.  Fix the resulting nuisance
messages by skipping these steps if a tty is not present.
```


----------



## xtaz (Feb 19, 2016)

This could be another small bug I've just uncovered. gnupg 2.1.11 just failed to build because it had a size mismatch issue with fetching the distfile. As a result this happened:


```
The task is complete.  Final tally:
Initial queue size: 6
  packages built: 0
  ignored: 0
  skipped: 5
  failed: 1

Duration: 00:01:09
The build logs can be found at: /var/log/synth
Scanning entire ports tree.
Removed: gnupg-2.1.8.txz
```

The old version gnupg-2.1.8 package shouldn't have been deleted in that scenario should it? This was with an upgrade-system command.


----------



## marino (Feb 19, 2016)

It's not synth's responsibility, it's a ports framework thing.  If the fetch command fails, it's the framework's fault.
Run "make checksum" manually on the port, and remove the distfile manually if you have to.  Sometimes it misfetches and the resulting fail fails the checksum.

It could also be that the error is real and the fetched file really doesn't match the check and that would be the case for everyone.


----------



## talsamon (Feb 19, 2016)

xtaz `Gnupg` failed cause of checksum mismatch. PR 207327


----------



## xtaz (Feb 19, 2016)

I'm not asking why the port failed to fetch. I'm suggesting that synth shouldn't delete the old 
gnupg-2.1.8.txz package file if a new package fails to build should it? As then neither the old or new version is available in the repository any longer until the port is fixed.


----------



## marino (Feb 19, 2016)

it has to, the package is invalid according to the ports specifications.  You can't mix invalid packages with good packages; it would destroy the integrity (basically you would be in portmaster territory with mismatching packages)


----------



## marino (Feb 19, 2016)

plus it doesn't matter.  the old package isn't removed from the system.  we are only affecting the repository.


----------



## vejnovic (Feb 19, 2016)

When start synth I got this:

```
03  --:--:--  check-sanity  get_catport: invalid key_cursor
```

And found this in file `00_last_results.log`:

```
00:00:18 [03] => emulators/linux_base-c6
```


----------



## marino (Feb 19, 2016)

"start" it how?  What command?


----------



## vejnovic (Feb 19, 2016)

marino@ said:


> "start" it how?  what command?



`env SYNTHPROFILE=mars synth just-build /usr/local/etc/synth/mars.pkglist`


----------



## marino (Feb 19, 2016)

Is your port tree stock?  is mars.pkglist got any strange characters in it?
Are there ports involved that are not in the ports tree?


----------



## marino (Feb 19, 2016)

Chances are it is related to "emulators/linux_base-c6" though.  What is special about your Linux setup, if anything?


----------



## vejnovic (Feb 19, 2016)

marino@ said:


> chance are it is related to "emulators/linux_base-c6" though.  what is special about your linux setup, if anything?


I have tried to find that emulators/linux_base-c6 file and delete it, but don't know where is it. I don't had any special setup for Linux.


----------



## vejnovic (Feb 19, 2016)

This is from file mars.pkglist:

```
archivers/arj
archivers/bzip2
archivers/file-roller
archivers/p5-Archive-Zip
archivers/p7zip
archivers/thunar-archive-plugin
archivers/unzip
archivers/zip
audio/clementine-player
audio/gstreamer-plugins-faad
audio/mate-media
deskutils/mate-utils
devel/bison
devel/cmake
devel/cppunit
devel/dmake
devel/doxygen
devel/git
devel/gitflow
devel/gmake
devel/gperf
devel/maven31
devel/mdds
devel/ninja
devel/patch
devel/ruby-gems
devel/tmake
devel/ucpp
devel/xorg-macros
devel/yajl
editors/libreoffice-sl
editors/vim
emulators/linux-c6
emulators/linux_base-c6
ftp/filezilla
graphics/cairo
graphics/evince
graphics/gimp
graphics/gstreamer-plugins-aalib
devel/git
devel/gitflow
devel/gmake
devel/gperf
devel/maven31
devel/mdds
devel/ninja
devel/patch
devel/ruby-gems
devel/tmake
devel/ucpp
devel/xorg-macros
devel/yajl
editors/libreoffice-sl
editors/vim
emulators/linux-c6
emulators/linux_base-c6
ftp/filezilla
graphics/cairo
graphics/evince
graphics/gimp
graphics/gstreamer-plugins-aalib
graphics/mupdf
graphics/vigra
java/eclipse
java/netbeans
java/openjdk8
lang/gawk
lang/python27
mail/ssmtp
mail/thunderbird
mail/thunderbird-dictionaries
mail/thunderbird-i18n
math/galculator
misc/mc
multimedia/gstreamer1-plugins-all
multimedia/gstreamer1-plugins-bad
multimedia/gstreamer1-plugins-good
multimedia/gstreamer1-plugins-ugly
net/vnc
net/openntpd
ports-mgmt/dialog4ports
ports-mgmt/portmaster
ports-mgmt/poudriere
print/cups
print/cups-filters
print/hplip
security/ca_root_nss
security/sudo
sysutils/apcupsd
sysutils/automount
sysutils/ezjail
sysutils/fusefs-ext4fuse
sysutils/fusefs-ntfs
sysutils/grub2-bhyve
sysutils/libcdio
sysutils/mate-system-monitor
sysutils/monit
textproc/aspell
textproc/gsed
textproc/intltool
textproc/linux-c6-expat
textproc/sl-aspell
www/chromium
www/firefox
www/firefox-i18n
www/midori
www/opera
www/xpi-adblock_plus
www/xpi-colorfultabs
www/xpi-firebug
www/xpi-flagfox
www/xpi-quick-locale-switcher
x11/glproto
x11/mate
x11/mate-desktop
x11/nvidia-driver-340
x11/slim
x11/xorg
x11-drivers/xf86-video-fbdev
x11-fonts/webfonts
x11-themes/icons-tango
x11-themes/icons-tango-extras
x11-themes/slim-themes
x11-toolkits/open-motif
```

The same file is used by ports-mgmt/poudriere without any problems.


----------



## marino (Feb 19, 2016)

It's a directory at /usr/ports and you can't delete it.
Something on your mars list is pulling it in.


----------



## marino (Feb 19, 2016)

That list seems complex.  why not just use "primes"?
I mean stuff like Dmake, etc, those are build dependencies.  you don't need to specify stuff like that.  specify the final port that you want.

unless you really want "Bison" ?


You can bisect the list --- break it to 2 parts, see which part pulls in Linux, and keep splitting it into two until you find the port.


----------



## marino (Feb 19, 2016)

Well, mystery solved:


```
emulators/linux-c6
emulators/linux_base-c6
```

you specified it.

Opera probably needs it too.


----------



## vejnovic (Feb 19, 2016)

marino@ said:


> well, mystery solved:
> 
> 
> ```
> ...



I will try and reported back sun.


----------



## marino (Feb 19, 2016)

I recommend that you really review that list and remove all the build dependencies.  Those will be pulled in as necessary.  Just put on the list what you actually want to be in the repository.


----------



## vejnovic (Feb 19, 2016)

The problem solved. 
Thank you.


----------



## vejnovic (Feb 19, 2016)

marino@ said:


> i recommend that you really review that list and remove all the build dependencies.  Those will be pulled in as necessary.  Just put on the list what you actually want to be in the repo.


 I will do review that list.


----------



## marino (Feb 19, 2016)

For everyone:
I'm going to be on vacation starting pretty much right now and going on for at least 8 days.  I'll bring a laptop with me but I don't know how much I'll connect in the next few days.

If there is anything unsolvable, just document it at:
https://github.com/jrmarino/synth/issues

And I'll look when I get back (and also work on version 1.1)


----------



## Murdock (Feb 23, 2016)

Hi Marino, thanks for your work! You described your tool at BSDnow to be easy for beginners, but I've got some questions:

First, your Github page lists the synth repo as the highest priority system repo, but when I want to install a built port through pkg, the official package gets installed instead. Why is this the case? I have to specify the full path for it to work – the „-r“ option doesn't work because „No repositories are enabled“.

Second, I want to install a custom built port into a jail, but neither `pkg -j X add` nor `pkg -j X install` work with full paths to a built port – but on the host machine it does. Can someone help me here, please?

Third, does your program provide an option to delete the whole local repo or individual packages, or can I safely delete /var/synth/ or particular packages followed by `synth rebuild-repository`?

Last, will your program provide a „-j“ jail option in the future? Why do some operations (rebuild-repository, purge distfiles) take for so long while just a few ports were compiled? And why is pkg being built when already being installed on the system?

Best regards and have a nice holiday,
Frank


----------



## marino (Feb 24, 2016)

Murdock said:


> First, your Github page lists the synth repo as the highest priority system repo, but when I want to install a built port through pkg, the official package gets installed instead. Why is this the case? I have to specify the full path for it to work – the „-r“ option doesn't work because „No repositories are enabled“.



It sounds like you have never run a synth command that would create the pkg config file.  `pkg -vv` would confirm that the Synth repository is not defined, but it sounds like pkg is saying NO repositories are defined.  The solution to the problem is to install through synth (once).  The correct way to install a package before that is `pkg add` and providing a full path to the package.



> Second, I want to install a custom built port into a jail, but neither `pkg -j X add` nor `pkg -j X install` work with full paths to a built port – but on the host machine it does. Can someone help me here, please?



you can run package directly after you install the missing pkg conf file.  you can also add a pkg conf file to the jail itself and call package from the jail.



> Third, does your program provide an option to delete the whole local repo or individual packages, or can I safely delete /var/synth/ or particular packages followed by `synth rebuild-repository`?



No, it is not safe, nor can I imagine a reason you would want to do that.  The repo is constructed as you said it should be and doesn't contain anything extra.



> Last, will your program provide a „-j“ jail option in the future?



no, that's a pkg command and it works on pkg when it's configured correctly. Synth builds repos, not installs packages (at best it commands pkg to install them; that's just for convenience)



> Why do some operations (rebuild-repository, purge distfiles) take for so long while just a few ports were compiled?


currently they scan the entire tree which takes a long time on FreeBSD (not DragonFly) because nobody is fixing the absurd USES=compiler:features implementation.  V1.1 will remove the full tree scan when I figure out how to do it safely on the repository rebuild.  Scanning the whole tree is unavoidable for purging distfiles, but is not like you run that command every day. More like every 2-3 months.



> And why is pkg being built when already being installed on the system?


Because each builder needs pkg in order to do queries and scanning options.  Synth doesn't use nor trust anything on the system other than the system root it's building on.[/quote]


----------



## protocelt (Feb 24, 2016)

I just noticed when scanning the ports tree Synth takes around 4 times as long for me with version 1.02. What used to take less than a minute in version 1.00 now takes around 4 minutes. Not really that big of a deal but I can see it taking far longer for other people as I have a pretty beefy machine with a ton of RAM.


----------



## xtaz (Feb 24, 2016)

marino@ said:


> No, it is not safe, nor can I imagine a reason you would want to do that.  The repo is constructed as you said it should be and doesn't contain anything extra.



I just upgraded my system from php56 to php70. The method I used was to dump all php56 ports with `pkg info -ao | grep php56 | awk {'print $2'} | sed -e 's/php56/php70/g' > portlist`, then I ran `synth build ./portlist`, followed by `pkg delete php56\*`, and `pkg install -r Synth `cat portlist``.

This seemed to work as expected, I had replaced all php56 ports with php70 ones. However then all of the old php56 ports were still found in the repo so I just deleted /var/synth/live_packages/All/php56* and ran `synth rebuild-repository` to make things consistent again.

I'm guessing you're going to say now that synth would have deleted the files automatically if I had run another command and there was no need at all to do this? But if not then that's an example of when you might want to do this?


----------



## marino (Feb 24, 2016)

xtaz said:


> This seemed to work as expected, I had replaced all php56 ports with php70 ones. However then all of the old php56 ports were still found in the repo so I just deleted /var/synth/live_packages/All/php56* and ran `synth rebuild-repository` to make things consistent again.



It's not necessary to do.  At some point (probably sooner rather than later) the packages will be considered obsolete and just deleted automatically before the next repository rebuild.



> I'm guessing you're going to say now that synth would have deleted the files automatically if I had run another command and there was no need at all to do this? But if not then that's an example of when you might want to do this?



Think about it this way.  You are a member of a library.  You need 100 books, but the library has 100,000 books.  You don't need to burn the 99,900 books that you don't use.  You don't care if they are there or not.  This case isn't nearly as extreme. Maybe there are 10% more packages in the repo that you won't use in the future. All it costs is disk space and maybe a few extra seconds when generating the repo digests.  In practical terms, there's not much to be gained by actively removing valid packages.  Just leave them there until they get removed naturally by bitrot.


----------



## fernandel (Feb 24, 2016)

protocelt said:


> I just noticed when scanning the ports tree Synth takes around 4 times as long for me with version 1.02. What used to take less than a minute in version 1.00 now takes around 4 minutes. Not really that big of a deal but I can see it taking far longer for other people as I have a pretty beefy machine with a ton of RAM.


On my FreeBSD 10.2-RELEASE (amd64) it happened the same as on your machine.


----------



## xtaz (Feb 25, 2016)

I'm not imagining it then? To be honest I can't remember how long it took on the older versions, but I do know that it takes ages on my server with the current version. I just timed it doing the "Scanning entire ports tree" stage and it took 31 minutes. It takes longer than compiling the actual packages themselves! Hopefully it's a lot faster in version 1.1 as it looks like it's going to be done a different way without a full tree scan.


----------



## marino (Feb 25, 2016)

it takes about 2.5 minutes on dragonfly and about 10 minutes on FreeBSD.  31 minutes is absurdly extreme.  if you are seeing that, your server is doing something else i/o-related at the same time.

edit: and no, nothing changed b/w 1.00 and 1.02.  I never got kpa's claim of 30 seconds for a full scan.


----------



## xtaz (Feb 25, 2016)

I can see that it's not doing anything else at all. It's just a low powered home-server box. An Intel Atom D525 1.8Ghz 4 core, 4GB RAM, and 2.5" 5400 rpm laptop hard drive. Running 10.3-BETA2 amd64. Not the fastest of things. But it does the job. Bit silly though that it usually compiles whatever package updates there are in 3 or 4 minutes and then takes 31 minutes to do the port tree scan. Hopefully 1.1 takes the problem away if it won't be doing a full tree scan any more.


----------



## marino (Feb 25, 2016)

nothing silly about it at all, the i/o for a full tree scan is magnitudes greater than a single port build.  it's why the INDEX file exists.  synth doesn't use the INDEX though.  but yes, changing the 5400 mech out with an SSD would cut that scan time dramatically....


----------



## kpa (Feb 25, 2016)

marino@ said:


> .  I never got kpa's claim of 30 seconds for a full scan.



I don't think I ever made such claim.


----------



## marcpearsonti (Feb 27, 2016)

I'm not sure if it's a bug ... but synth show theses errors for a "pseudo-package" like graphics/ImageMagick-nox11 (ImageMagick without x11). Synth seems to ignore all the options from parent port


```
ImageMagick-nox11-6.9.2.10,1.txz has less options than required (31)
ImageMagick-nox11-6.9.2.10,1.txz failed option check.
```


----------



## marino (Feb 27, 2016)

You're reaching the wrong conclusion based on the error messages.  There error is saying that the port (ImageMagic-nox11) has 31 options listed and the existing package (of ImageMagic-nox11) lists less than 31.

This happens commonly when the port itself has a bug in it. It requires careful inspection of the port to determine which option is bad (often the port maintainer tries to get clever with dynamically adding options based on what's on the host system and synth hates that. it's also wrong.  those types of things need to be fixed)


----------



## marcpearsonti (Feb 27, 2016)

Ok so what should i do with this error ? Synth will always complain ... How can i find the faulty option ?


----------



## marcpearsonti (Feb 27, 2016)

Maybe i should install graphics/ImageMagick and turn OFF manually the options set by graphics/ImageMagick-nox11 Makefile. 
What do you think ?


----------



## marino (Feb 27, 2016)

marcpearsonti@
First, this is not a drastic issue.  The impact of doing nothing is that the port rebuilds every single time.  If you run synth weekly, it's just building that port usually unnecessarily.  So in the end, it's not really a big deal.

secondly: you can report the issue on bugzilla and CC me.  Then maybe I can look or the maintainer can look.  Or when I find the problem, the maintainer will be informed.  I have not looked yet, but I fully expect it will not be difficult to find the culprit (even though there are 31 options which kind of sounds like a nightmare)


----------



## marino (Feb 27, 2016)

marcpearsonti said:


> Maybe i should install graphics/ImageMagick and turn OFF manually the options set by graphics/ImageMagick-nox11 Makefile.
> What do you think ?



I don't think it will work.  The port itself is broken with regard to the number of options.  The value of the options is not the problem.


----------



## marcpearsonti (Feb 27, 2016)

marino@ said:


> I don't think it will work.  The port itself is broken with regard to the number of options.  The value of the options is not the problem.



I'm not a ports professionnal, but i think it's related to how graphics/ImageMagick and graphics/ImageMagick-nox11 share port options. ImageMagick-nox11 unset 3 options from ImageMagick parent port. In the end, the package built by synth have 28 options (pkg info reports 28 options) missing the 3 ones unset by ImageMagick-nox11 so the count doesn't match. 

I hope this info we help a little bit !


----------



## marino (Feb 27, 2016)

that's not it.  that's a very common thing to do.  just the fact that ImageMagick-nox11 is slave port is not significant.


----------



## marcpearsonti (Feb 27, 2016)

Now a other question...

Since a few days synth always finish with this error


```
/usr/sbin/chroot /usr/obj/synth-live/SL09 /usr/local/sbin/pkg-static repo /packages => failed (exit code not 0)
```

and  /var/synth/live_packages/ missing the meta, digest and packagesite.

I need to run the pkg-static command manually to rebuild my repository

I don't know how to debug this situation, nothing found in synth's logs files about the rebuild-repository phase


----------



## marino (Feb 27, 2016)

marcpearsonti said:


> Ok so what should i do with this error ? Synth will always complain ... How can i find the faulty option ?


I can't reproduce this error *on DragonFly*.   Have you customized options on ImageMagick-nox11?


----------



## marino (Feb 27, 2016)

marcpearsonti said:


> I don't know how to debug this situation, nothing found in synth's logs files about the rebuild-repository phase



Synth 1.02 had a regression where some failed commands didn't announce.  It's possible that an earlier failure is manifesting here.  What's in the github repo now fixes the regression but it's not been released yet. 

Summary: I don't know what could be causing it, but we need to try again with the next release to see if we get more information.


----------



## marcpearsonti (Feb 27, 2016)

marino@ said:


> I can't reproduce this error *on DragonFly*.   Have you customized options on ImageMagick-nox11?



NO and FYI i'm running FreeBSD 9.3 release amd64 with ports from 2016Q1 branch


----------



## marcpearsonti (Feb 27, 2016)

Here another one:


```
databases/rrdtool package has more dependencies than the port requires (8)
Query: textproc/libxml2:libxml2-2.9.3
x11-toolkits/pango:pango-1.36.8_2
lang/perl5.20:perl5-5.20.3_8
x11-fonts/dejavu:dejavu-2.35
graphics/cairo:cairo-1.14.6,2
graphics/png:png-1.6.20
print/freetype2:freetype2-2.6.2
devel/glib20:glib-2.44.1_3
devel/gettext-runtime:gettext-runtime-0.19.6

Tripped on: gettext-runtime-0.19.6.txz:devel/gettext-runtime
rrdtool-1.4.8_9.txz failed dependency check.
```

What's mean «Tripped on» ?
How to correct this?


----------



## marino (Feb 27, 2016)

rrdtool has already been fixed, but was not backported to Q1.
I almost wouldn't recommend Synth until Q2 for this reason (rrdtool isn't the only one that was fixed in head only)


----------



## marino (Feb 27, 2016)

marcpearsonti said:


> NO and FYI i'm running FreeBSD 9.3 release amd64 with ports from 2016Q1 branch


So the early possibilities are:

it's already been fixed in ports HEAD (iow it's a Q1-only problem)
It's a FreeBSD-specific issue (normally related to base libraries)
I'd guess the first one.


----------



## PacketMan (Feb 28, 2016)

Snow is all gone.  

Any idea what would cause this? This is in version 0.99.  I'll try to get it updated soon, but I'm curious as to what would cause this:


```
# synth rebuild-repository
Scanning entire ports tree.
Scanning existing packages. 
Failed to install pkg-static in builder 9
Failed to rebuild repository  (Synth must exit)
```


```
# synth status
Querying system about current package installations.
Stand by, comparing installed packages against the ports tree.
Failed to install pkg(8) scanner  (Synth must exit)
Unfortunately, the system upgrade failed.
```


----------



## marino (Feb 28, 2016)

The next release might show the error better but it's failing on running this command in chroot:
`/usr/bin/tar -xf /packages/Latest/pkg.txz -C / */pkg-static`

maybe there's a problem with pkg.txz and it might be fixed by deleting it (so it will be rebuilt).   Just a wild guess because there's not much that could go wrong with a tar extract command.


----------



## marcpearsonti (Mar 6, 2016)

Hi marino@

I always use synth this way

1. synth status
2. synth prepare-system
3. pkg upgrade -r Synth

When dependencies change, synth status will report all ports who needs to be rebuild

But when i run the step 3, only some packages (2 of 25) are upgraded

Why synth needs to rebuild ports if at the end they will not be reinstall ?
I was thinking all the rebuilt ports will be reinstall to fix broken dependency ?

I'm not sure i understand how dependencies are working ...


----------



## kpa (Mar 6, 2016)

marcpearsonti said:


> Hi marino@
> 
> I always use synth this way
> 
> ...



It's because nothing will tell you or the build tools if the rebuild of the dependent ports really would result in updated packages or not and which one would change. Packages that did not change in pkg's eyes will not be updated even if the package builder rebuilt them. It would be of course nice to have a crystal ball that could tell you if it is necessary the to rebuild all the dependents of a changed port but so far no one has come up with one.


----------



## marino (Mar 6, 2016)

well, i definitely know an algorithm that would greatly reduce rebuilds [1] but what isn't know is if something will subtlely break.

[1] example: lang/python is bumped.  If you run poudriere/synth it will remove python and then around 10,000 ports will fail dependency checks in a recursive cascade.  If synth detected that and rebuilt python in a single port run, then the cascade would be avoided.  But who is to say that won't cause problems?  It's also complex to determine all these single port runs before "real" bulk run.  very complex, i guess so far considered too risky and too much trouble.


----------



## tankist02 (Mar 7, 2016)

@marino Thank a lot for the great tool and explanation what and why it does. I used to have mysterious crashes after running portmaster. These days I use synth exclusively and crashes don't happen anymore. I tried to use poudriere and it was just too much and slow-ish for my simple needs (home desktop). 

BTW what is a good size for ccache cache? I set max size at 12GB and currently the size is 7.4. Is it a good idea to clean the cache from time to time?


----------



## marino (Mar 7, 2016)

tankist02 said:


> BTW what is a good size for ccache cache? I set max size at 12GB and currently the size is 7.4. Is it a good idea to clean the cache from time to time?


No, that's not a good idea.  It's self-cleaning.  In normal cases, you don't need to touch it at all.
I just set my max to 20G or 25G because

i build a lot of stuff, probably more than most
it doesn't use that space unless it needs to
diskspace is cheap
I would think 12G is sufficient for most people though.


----------

