Commit graph

53 commits

Author SHA1 Message Date
Adam Spiers
8436768144 Eliminate erroneous warning when unstowing (#65)
When unstowing a package, cleanup_invalid_links() is invoked to remove
any invalid links owned by Stow.  It was invoking link_owned_by_package()
to check whether each existing link is owned by Stow.  This in turn
called find_stowed_path() which since 40a0807185 was not allowing for
the possibility that it could be passed a symlink *not* owned by Stow
with an absolute target and consequently emitting an erroneous warning.

So remove this erroneous warning, and refactor find_stowed_path()
to use two new helper functions for detecting stow directories:
link_dest_within_stow_dir() and find_containing_marked_stow_dir().
Also refactor the logic within each to be simpler and more accurate,
and add more test cases to the corresponding parts of the test suite.

Fixes #65.
Closes #103.

https://github.com/aspiers/stow/issues/65
2024-03-31 14:03:47 +01:00
Adam Spiers
6519ee8426 aclocal.m4: update to 1.16.5 2024-03-09 17:56:57 +00:00
Adam Spiers
72140071ad manual: improve explanation of target directory definition
Bring this more up to date by mentioning the dotfiles use case.
2024-03-09 17:56:14 +00:00
Adam Spiers
478c7b921d Add watch target to Makefile for easier hacking 2024-03-09 17:56:14 +00:00
Adam Spiers
a829eeb4a0 Upgrade aclocal to 1.16.3 2021-04-15 15:11:30 +01:00
Adam Spiers
64e0dc8793 Beef up README.md and add CONTRIBUTING.md 2021-04-15 15:11:30 +01:00
Adam Spiers
a3f526edc2 NEWS: update for 2.3.2 2021-04-15 15:11:30 +01:00
Adam Spiers
134e448aec NEWS: set org-blank-before-new-entry 2021-04-15 15:11:30 +01:00
Adam Spiers
8cd6cadd3d Replace broken gmane links with links to lists.gnu.org
gmane has been dead for quite a while:

    https://lars.ingebrigtsen.no/2020/01/06/whatever-happened-to-news-gmane-org/
2021-04-15 15:11:29 +01:00
Adam Spiers
59658a6c4e NEWS: disable org-export-with-toc
2.3.0 was a big release with lots of stuff, but most releases will
be smaller, so default to not having a ToC.
2019-07-28 14:29:06 +01:00
Adam Spiers
4f043bbd58 NEWS: don't export with author name
Avoid extra noise when exporting to text for a release announcement.
2019-07-28 14:28:41 +01:00
Adam Spiers
bfe091f28e Prepare NEWS for 2.3.1 release 2019-07-28 13:10:49 +01:00
Adam Spiers
9ce10eb3b1 Remove dependencies on Hash::Merge and Clone::Choose
stow 2.3.0 added external runtime dependencies on Hash::Merge and
Clone::Choose. Historically stow hasn't had runtime dependencies other
than Perl itself, which is a useful property if you're managing the
installation of Perl using stow; the bootstrapping instructions in
stow's manual would need updating to describe how to install these two
modules (and any dependencies they have now or in the future) as well.

However, Hash::Merge is much more general than stow actually needs, so
replace the merge() call with a few lines of equivalent code -- this
avoids the external dependencies, and is clearer than the merge()
call.

Many thanks to Adam Sampson for this patch:

https://lists.gnu.org/archive/html/bug-stow/2019-06/msg00001.html
2019-06-29 13:42:19 +01:00
Adam Spiers
4a9121eec9 Bump version to 2.3.1 for development of next release 2019-06-29 13:40:55 +01:00
Adam Spiers
583f0f01ea Add GPL v3 upgrade to NEWS for 2.3.0 release
Forgot to do this prior to the release :-(  But at least it will
be mentioned in the announcement on the mailing lists.
2019-06-29 01:30:56 +01:00
Adam Spiers
94175829b9 Make NEWS export to text better
Run org-convert-to-odd-levels on NEWS and set local variables so
that sections can easily be exported for release announcements.
2019-06-29 01:30:33 +01:00
Adam Spiers
74f0182834 Add separate tests for .stowrc from $HOME and $PWD
.stowrc can be obtained from $HOME and/or the current working
directory; however only the $HOME case was tested before, because
during tests Stow was being run from $HOME.

So switch $TEST_DIR to an absolute path, create a new run_from/
subdirectory, and chdir to that before invoking any Stow code.  This
allows us to test the behaviour of .stowrc in $HOME and run_from/
separately.
2019-06-28 16:39:53 +01:00
Adam Spiers
22ca973d59 Switch to makeinfo --html --no-split for single-page HTML manual (#21)
Remove the dependency on the ancient and unmaintained texi2html, which
was difficult to get running on most distros other than openSUSE.

There are two more modern alternative approaches which can replace
this:

  - Use texi2any
  - Use makeinfo --html --no-split

The latter seems to be the standard way these days, so we switch to
that; however we keep Makefile rules for all three, and a phony
meta-rule 'manual-single-html-all' to allow quick comparison between
them.  Make tweaks accordingly to minimise the differences and improve
the output.

The rules for the older two approaches do not get triggered by
default.

Fixes #21: https://github.com/aspiers/stow/issues/21
2019-06-26 13:48:06 +01:00
Charles LeDoux
dc42c34107 Add function to expand ~ in .stowrc files (#14)
Add a new expand_tilde() function that performs tilde expansion of
strings, and corresponding unit tests:

    * A ~ at the beginning of a path is expanded to the user's home
      directory.
    * Literal '~' can be provided with '\~'

Combine this with expand_environment() in a new expand_filepath()
function which applies all (both) required expansion functions to a
string, and use that in get_config_file_options() to expand .stowrc
options.

Add more tests to check that tilde expanded in correct places, i.e.:

    * expanded for --target and --dir
    * not expanded for --ignore, --defer, or --override

Update documentation on stowrc files according to this functionality
change.

Fixes #14: https://github.com/aspiers/stow/issues/14
2019-06-25 19:38:43 +01:00
Adam Spiers
0f3e1b33fc Group news items for 2.3.0
Since 2.3.0 is a long overdue release and has many changes,
document them in NEWS in three groups:

- New features / changes in behaviour
- Documentation fixes and enhancements
- Fixes for bugs and technical debt
2019-06-25 19:36:49 +01:00
Adam Spiers
f6bf45af9c Update NEWS and THANKS according to recent commits 2019-06-25 17:41:17 +01:00
Adam Spiers
94b155d99b Prepare NEWS file for 2.3.0 release 2016-11-20 22:57:39 +00:00
Adam Spiers
c482b0291d NEWS: Explain why 2.2.1 was not released 2015-11-09 12:36:51 +00:00
Adam Spiers
43333b8eca add Stow/Util.pm.in with @VERSION@ substitution
This is now necessary in order to prevent pause.perl.org from
complaining:

    Status: Decreasing version number
    =================================

         module : Stow::Util
         version: undef
         in file: lib/Stow/Util.pm
         status : Not indexed because lib/Stow/Util.pm in
                 A/AS/ASPIERS/Stow-v2.2.0.tar.gz has a higher version number
                 (0)
2015-11-09 12:36:51 +00:00
Adam Spiers
c77e85c5e9 Prepare NEWS file for 2.2.1 release 2015-11-09 09:16:53 +00:00
Adam Spiers
3d0e3cb48e Remove trailing whitespace from NEWS file 2015-11-09 09:16:51 +00:00
Adam Spiers
4cd91ed54c Bump version to 2.2.0 2012-02-18 20:33:34 +00:00
Adam Spiers
ed12c787df Add --no-folding option. 2012-02-18 20:33:34 +00:00
Adam Spiers
17d3586e84 Remove -a option for safety reasons (but keep --adopt). 2012-02-18 20:33:34 +00:00
Adam Spiers
a127d22457 Improve error message when package is not found. 2012-02-18 20:33:34 +00:00
Adam Spiers
91c816e32d Use make_invalid_link() to reliably setup symlink fixtures. 2012-02-18 20:33:34 +00:00
Adam Spiers
af4557c543 Add documentation improvements to NEWS. 2012-02-18 20:33:34 +00:00
Adam Spiers
8357dca645 Remove "There are no outstanding operations to perform" warning.
This is more in keeping with the UNIX convention of no output on success,
and is also the way Stow v1.x behaved.  Thanks to Adam Sampson for the suggestion.
2012-01-11 14:01:40 +00:00
Adam Spiers
d51ff055c2 Fix wrong version number in NEWS. 2012-01-10 12:17:58 +00:00
Adam Spiers
9889d10b2e Bump version to 2.1.3 2012-01-09 22:12:49 +00:00
Adam Spiers
7e44666640 Add --adopt / -a option. 2012-01-09 21:29:34 +00:00
Adam Spiers
e466732bbf Improve readability of NEWS file when viewed raw. 2012-01-09 16:42:40 +00:00
Adam Spiers
215e0dac13 Make configure check for Perl modules required by test suite. 2011-12-13 16:12:29 +00:00
Adam Spiers
195c80e9d7 Significantly improve the handling of --with-pmdir. 2011-12-07 20:48:50 +00:00
Adam Spiers
d88434f16e Abort ./configure if we can't find Perl. 2011-12-07 20:31:18 +00:00
Adam Spiers
e7e0646db0 Ensure the ChangeLog is up-to-date when making a new distribution.
Thanks to Stefano Lattarini for this suggestion.
2011-12-07 01:23:41 +00:00
Adam Spiers
d051936bf5 Bump version to 2.1.1 2011-12-06 17:42:02 +00:00
Adam Spiers
bbaace4d5a Fix automake issues (thanks to Stefano Lattarini for spotting these!) 2011-12-06 17:11:12 +00:00
Adam Spiers
1507d1a055 Calculated the correct default value for pmdir based on the local Perl installation. 2011-12-06 16:26:27 +00:00
Adam Spiers
d879bde678 Fixed bug where --with-pmdir was ineffectual. 2011-12-06 16:26:24 +00:00
Adam Spiers
a17537af3e Give up on automake's built-in rules for generating PDF and HTML and use our own.
Also include split version of the manual.
2011-12-03 14:42:41 +00:00
Adam Spiers
b03c6df978 Add NEWS entry for 2.1.0 2011-11-26 16:34:58 +00:00
Adam Spiers
6b815a9a90 Add chkstow to NEWS 2011-11-26 16:34:57 +00:00
Adam Spiers
5a09c527b3 Fix indentation issues in NEWS 2011-11-24 16:55:53 +00:00
Adam Spiers
ad28894a85 Switch NEWS and TODO to org-mode.
org-mode has been included in emacs by default for a long time and is
much more friendly than outline-mode.  No impact to non-emacs users.
2011-11-24 16:55:53 +00:00